﻿@model MiniScrum.Models.UserRolesModel 
@{
    ViewBag.Title = "User Roles";
}
<h2>
    User Roles</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>User</legend>
        @Html.HiddenFor(model => model.UserId)
        @Html.ListBox("selected", new MultiSelectList(Model.Roles, "Id", "RoleName", Model.Selected))
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to users", "List", "User")
</div>
